#define _GNU_SOURCE
#include "app_pool.h"
#include "log/log.h"
#include <stdlib.h>
#include <unistd.h>
int task_fun(void *arg)
{
    log_debug("任务函数(tid=%d)执行,arg:%s", gettid(), (char *)arg);
}
int main(int argc, char const *argv[])
{
    app_pool_init(5);
    for (int i = 0; i < 8; i++)
    {
        char *data = malloc(10);
        sprintf(data, "%s_%d", "abc", i);
        app_pool_register(task_fun, data);
    }
    sleep(2);
    app_pool_close();
    log_debug("主线程结束");
    return 0;
}
